def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])
Code style
def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])def divideNums( A , B):return A/Bdef multiply(a,b ):return a *b
Code style
def add_nums( A ,B):return A+Bimport numpy as npdef add_nums_numpy( A ,B):return np.sum([A, B])def divideNums( A , B):return A/Bdef multiply(a,b ):return a *bdef main( ) : x= add_nums(2, 3) #some comment y=multiply( x ,4 ) # in the middle of the seaprint( "sum:",x )print("product:" , y)
Code style
import numpy as npdef add_nums(A, B):return A + Bdef add_nums_numpy(A, B):return np.sum([A, B])def divideNums(A, B):return A / Bdef multiply(a, b):return a * bdef main(): x = add_nums(2, 3)# some comment y = multiply(x, 4) # in the middle of the seaprint("sum:", x)print("product:", y)